﻿<ResourceDictionary xmlns:System_Windows_Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Layout.Toolkit"
                    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                    xmlns:System="clr-namespace:System;assembly=mscorlib"
                    xmlns:layouttoolkit="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Layout.Toolkit"
                    xmlns:inputtoolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Input.Toolkit"
                    xmlns:System_Windows_Controls_Primitives="clr-namespace:System.Windows.Controls.Primitives;assembly=System.Windows.Controls.Input.Toolkit"
                    xmlns:toolkit="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit"
                    xmlns:dataInput="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Data.Input"
                    xmlns:System_Windows_Controls_DataVisualization_Charting="clr-namespace:System.Windows.Controls.DataVisualization.Charting;assembly=System.Windows.Controls.DataVisualization.Toolkit"
                    xmlns:charttoolkit="clr-namespace:System.Windows.Controls.DataVisualization;assembly=System.Windows.Controls.DataVisualization.Toolkit"
                    xmlns:System_Windows_Controls_DataVisualization_Charting_Primitives="clr-namespace:System.Windows.Controls.DataVisualization.Charting.Primitives;assembly=System.Windows.Controls.DataVisualization.Toolkit"
                    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                    mc:Ignorable="d">

    <!-- Global Settings-->
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="Brushes.xaml" />
        <ResourceDictionary Source="Fonts.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <!--Accordion Style-->
    <Style TargetType="System_Windows_Controls:Accordion">
        <Setter Property="FontFamily"
                Value="{StaticResource ContentFontFamily}" />
        <Setter Property="FontSize"
                Value="{StaticResource ContentFontSize}" />
        <Setter Property="Foreground"
                Value="{StaticResource TextContentBrush}" />
        <Setter Property="BorderBrush"
                Value="{StaticResource BaseBrush5}" />
        <Setter Property="Background"
                Value="{StaticResource BlankBackgroundBrush}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="HorizontalAlignment"
                Value="Left" />
        <Setter Property="VerticalAlignment"
                Value="Top" />
        <Setter Property="Height"
                Value="Auto" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="Cursor"
                Value="Arrow" />
        <Setter Property="Padding"
                Value="0" />
        <Setter Property="Margin"
                Value="0" />
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="TabNavigation"
                Value="Once" />
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel VerticalAlignment="Top" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="System_Windows_Controls:Accordion">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                Padding="{TemplateBinding Padding}"
                                CornerRadius="1">
                            <ScrollViewer BorderBrush="Transparent"
                                          BorderThickness="0"
                                          Background="{x:Null}"
                                          HorizontalScrollBarVisibility="Disabled"
                                          IsTabStop="False"
                                          Margin="0"
                                          Padding="0"
                                          VerticalScrollBarVisibility="Disabled">
                                <ItemsPresenter />
                            </ScrollViewer>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

    </Style>

    <!--AccordionButton Style-->
    <Style TargetType="layouttoolkit:AccordionButton">
        <Setter Property="Background"
                Value="{StaticResource NormalBrush}" />
        <Setter Property="HorizontalAlignment"
                Value="Stretch" />
        <Setter Property="VerticalAlignment"
                Value="Stretch" />
        <Setter Property="HorizontalContentAlignment"
                Value="Center" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="IsTabStop"
                Value="True" />
        <Setter Property="TabNavigation"
                Value="Once" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="layouttoolkit:AccordionButton">
                    <Grid Background="Transparent"
                          Margin="{TemplateBinding Padding}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="ExpandDirectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="ExpandDown">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Storyboard.TargetName="icon">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="icon">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Storyboard.TargetName="header">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="header">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="Width"
                                                                       Storyboard.TargetName="cd0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Auto" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="Width"
                                                                       Storyboard.TargetName="cd1">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation BeginTime="00:00:00"
                                                         Duration="00:00:00"
                                                         To="-90"
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                                         Storyboard.TargetName="arrow" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandUp">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Storyboard.TargetName="icon">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="icon">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Storyboard.TargetName="header">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="header">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="Width"
                                                                       Storyboard.TargetName="cd0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="Width"
                                                                       Storyboard.TargetName="cd1">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Auto" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation BeginTime="00:00:00"
                                                         Duration="00:00:00"
                                                         To="90"
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                                         Storyboard.TargetName="arrow" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Storyboard.TargetName="icon">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="icon">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Storyboard.TargetName="header">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="header">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="Height"
                                                                       Storyboard.TargetName="rd0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Auto" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="Height"
                                                                       Storyboard.TargetName="rd1">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="LayoutTransform"
                                                                       Storyboard.TargetName="header">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <TransformGroup>
                                                        <RotateTransform Angle="90" />
                                                    </TransformGroup>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation BeginTime="00:00:00"
                                                         Duration="00:00:00"
                                                         To="0"
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                                         Storyboard.TargetName="arrow" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Storyboard.TargetName="icon">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="icon">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Storyboard.TargetName="header">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="header">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="Height"
                                                                       Storyboard.TargetName="rd0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="Height"
                                                                       Storyboard.TargetName="rd1">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Auto" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="0"
                                                                       Duration="0"
                                                                       Storyboard.TargetProperty="LayoutTransform"
                                                                       Storyboard.TargetName="header">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <TransformGroup>
                                                        <RotateTransform Angle="-90" />
                                                    </TransformGroup>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimation BeginTime="00:00:00"
                                                         Duration="00:00:00"
                                                         To="180"
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                                         Storyboard.TargetName="arrow" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpansionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Collapsed">
                                    <Storyboard>
                                        <DoubleAnimation BeginTime="00:00:00"
                                                         Duration="00:00:00.3"
                                                         To="0"
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                                         Storyboard.TargetName="icon" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Expanded">
                                    <Storyboard>
                                        <DoubleAnimation BeginTime="00:00:00"
                                                         Duration="00:00:00.3"
                                                         To="90"
                                                         Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[2].(RotateTransform.Angle)"
                                                         Storyboard.TargetName="icon" />
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Duration="00:00:00.0010000"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="ExpandedBackground">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CheckStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Checked" />
                                <VisualState x:Name="Unchecked" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                    <VisualTransition From="Normal"
                                                      GeneratedDuration="0:0:0.01"
                                                      To="MouseOver">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <ExponentialEase EasingMode="EaseIn"
                                                             Exponent="7" />
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                    <VisualTransition From="MouseOver"
                                                      GeneratedDuration="0:0:0.1"
                                                      To="Normal">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <CircleEase EasingMode="EaseIn" />
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                                      To="MouseOver" />
                                    <VisualTransition GeneratedDuration="00:00:00.1"
                                                      To="Pressed" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <ColorAnimation BeginTime="0"
                                                        To="{StaticResource BaseColor2}"
                                                        Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)"
                                                        Storyboard.TargetName="arrow" />
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Duration="00:00:00.0010000"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="MouseOverBackground">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(Control.Foreground).(SolidColorBrush.Color)"
                                                                      Storyboard.TargetName="header">
                                            <EasingColorKeyFrame KeyTime="0"
                                                                 Value="{StaticResource BaseColor2}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ColorAnimation BeginTime="0"
                                                        To="{StaticResource AccentColor}"
                                                        Storyboard.TargetProperty="(Path.Stroke).(SolidColorBrush.Color)"
                                                        Storyboard.TargetName="arrow" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard />
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="FocusVisualElement">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Duration="00:00:00.0010000"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="FocusVisualElement">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                  Value="0.385" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="background"
                                BorderBrush="{StaticResource BaseBrush6}"
                                Background="{TemplateBinding Background}"
                                BorderThickness="1">
                            <Grid>
                                <Border x:Name="ExpandedBackground"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        Background="{StaticResource NormalBrush}"
                                        Height="Auto"
                                        Margin="0,0,0,0"
                                        Opacity="0"
                                        VerticalAlignment="Stretch" />
                                <Border x:Name="MouseOverBackground"
                                        BorderBrush="{TemplateBinding BorderBrush}"
                                        BorderThickness="{TemplateBinding BorderThickness}"
                                        Background="{StaticResource MouseOverBrush}"
                                        Height="Auto"
                                        Margin="0,0,0,0"
                                        Opacity="0"
                                        VerticalAlignment="Stretch" />
                                <Grid Background="Transparent">
                                    <Grid.RowDefinitions>
                                        <RowDefinition x:Name="rd0"
                                                       Height="Auto" />
                                        <RowDefinition x:Name="rd1"
                                                       Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition x:Name="cd0"
                                                          Width="Auto" />
                                        <ColumnDefinition x:Name="cd1"
                                                          Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid x:Name="icon"
                                          Grid.Column="0"
                                          HorizontalAlignment="Center"
                                          Height="19"
                                          Margin="4,0,0,0"
                                          Grid.Row="0"
                                          RenderTransformOrigin="0.5,0.5"
                                          VerticalAlignment="Center"
                                          Width="19">
                                        <Grid.RenderTransform>
                                            <TransformGroup>
                                                <ScaleTransform />
                                                <SkewTransform />
                                                <RotateTransform Angle="-90" />
                                                <TranslateTransform />
                                            </TransformGroup>
                                        </Grid.RenderTransform>
                                        <Path x:Name="arrow"
                                              Data="M 1,1.5 L 4.5,5 L 8,1.5"
                                              HorizontalAlignment="Center"
                                              Height="Auto"
                                              Margin="0,0,0,0"
                                              RenderTransformOrigin="0.5,0.5"
                                              Stroke="{StaticResource BaseBrush4}"
                                              StrokeThickness="2"
                                              VerticalAlignment="Center"
                                              Width="Auto">
                                            <Path.RenderTransform>
                                                <TransformGroup>
                                                    <ScaleTransform />
                                                    <SkewTransform />
                                                    <RotateTransform />
                                                    <TranslateTransform />
                                                </TransformGroup>
                                            </Path.RenderTransform>
                                        </Path>
                                    </Grid>

                                    <System_Windows_Controls:LayoutTransformer x:Name="header"
                                                                               ContentTemplate="{TemplateBinding ContentTemplate}"
                                                                               Content="{TemplateBinding Content}"
                                                                               Foreground="{TemplateBinding Foreground}"
                                                                               FontWeight="{TemplateBinding FontWeight}"
                                                                               FontStyle="{TemplateBinding FontStyle}"
                                                                               FontStretch="{TemplateBinding FontStretch}"
                                                                               FontSize="{TemplateBinding FontSize}"
                                                                               FontFamily="{TemplateBinding FontFamily}"
                                                                               HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                                               Grid.Column="1"
                                                                               Margin="6"
                                                                               Grid.Row="0"
                                                                               Grid.RowSpan="1" />

                                </Grid>
                            </Grid>
                        </Border>
                        <Rectangle x:Name="FocusVisualElement"
                                   IsHitTestVisible="false"
                                   Stroke="{StaticResource FocusedBrush}"
                                   StrokeThickness="1"
                                   Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="{StaticResource TextContentBrush}" />
        <Setter Property="BorderBrush"
                Value="{StaticResource BaseBrush5}" />
        <Setter Property="BorderThickness"
                Value="1" />
    </Style>

    <!--ExpandableContentControl Style-->
    <Style TargetType="layouttoolkit:ExpandableContentControl">
        <Setter Property="IsEnabled"
                Value="true" />
        <Setter Property="Cursor"
                Value="Arrow" />
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="TabNavigation"
                Value="Once" />
        <Setter Property="BorderThickness"
                Value="0" />
        <Setter Property="Padding"
                Value="0" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="layouttoolkit:ExpandableContentControl">
                    <ContentPresenter x:Name="ContentSite"
                                      Cursor="{TemplateBinding Cursor}"
                                      ContentTemplate="{TemplateBinding ContentTemplate}"
                                      HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                      Margin="4"
                                      VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="{StaticResource TextContentBrush}" />
    </Style>

    <!--AccordionItem Style-->
    <Style TargetType="System_Windows_Controls:AccordionItem">
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="BorderBrush"
                Value="{StaticResource BaseBrush5}" />
        <Setter Property="Background"
                Value="{StaticResource BlankBackgroundBrush}" />
        <Setter Property="Margin"
                Value="0" />
        <Setter Property="Padding"
                Value="0" />
        <Setter Property="HorizontalAlignment"
                Value="Stretch" />
        <Setter Property="VerticalAlignment"
                Value="Stretch" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Top" />
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="System_Windows_Controls:AccordionItem">
                    <Grid HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                          VerticalAlignment="{TemplateBinding VerticalAlignment}">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="rectangle">
                                            <EasingDoubleKeyFrame KeyTime="0"
                                                                  Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpansionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Collapsed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="(ExpandableContentControl.Percentage)"
                                                                       Storyboard.TargetName="ExpandSite">
                                            <SplineDoubleKeyFrame KeySpline="0.2,0,0,1"
                                                                  KeyTime="00:00:00.3"
                                                                  Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00.3"
                                                                       Duration="00:00:00"
                                                                       Storyboard.TargetProperty="(UIElement.Visibility)"
                                                                       Storyboard.TargetName="ExpandSite">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Collapsed</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Expanded">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="(ExpandableContentControl.Percentage)"
                                                                       Storyboard.TargetName="ExpandSite">
                                            <SplineDoubleKeyFrame KeySpline="0.2,0,0,1"
                                                                  KeyTime="00:00:00.3"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="LockedStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Locked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="IsEnabled"
                                                                       Storyboard.TargetName="ExpanderButton">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="False" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unlocked">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="IsEnabled"
                                                                       Storyboard.TargetName="ExpanderButton">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="True" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ExpandDirectionStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="ExpandDown">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Height"
                                                                       Storyboard.TargetName="rd1">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Width"
                                                                       Storyboard.TargetName="cd0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandUp">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="ExpanderButton">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="ExpandSite">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Height"
                                                                       Storyboard.TargetName="rd0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Width"
                                                                       Storyboard.TargetName="cd0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandLeft">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.ColumnSpan)"
                                                                       Storyboard.TargetName="ExpanderButton">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.ColumnSpan)"
                                                                       Storyboard.TargetName="ExpandSite">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.RowSpan)"
                                                                       Storyboard.TargetName="ExpanderButton">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="2" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.RowSpan)"
                                                                       Storyboard.TargetName="ExpandSite">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="2" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Storyboard.TargetName="ExpanderButton">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="ExpandSite">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Height"
                                                                       Storyboard.TargetName="rd0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Width"
                                                                       Storyboard.TargetName="cd0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ExpandRight">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.ColumnSpan)"
                                                                       Storyboard.TargetName="ExpanderButton">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.ColumnSpan)"
                                                                       Storyboard.TargetName="ExpandSite">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.RowSpan)"
                                                                       Storyboard.TargetName="ExpanderButton">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="2" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.RowSpan)"
                                                                       Storyboard.TargetName="ExpandSite">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="2" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Row)"
                                                                       Storyboard.TargetName="ExpandSite">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="0" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="(Grid.Column)"
                                                                       Storyboard.TargetName="ExpandSite">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="1" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Height"
                                                                       Storyboard.TargetName="rd0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Width"
                                                                       Storyboard.TargetName="cd1">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="*" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Background"
                                BorderBrush="{StaticResource BaseBrush5}"
                                Padding="{TemplateBinding Padding}"
                                Background="{TemplateBinding Background}">
                            <Grid>
                                <Grid.RowDefinitions>
                                    <RowDefinition x:Name="rd0"
                                                   Height="Auto" />
                                    <RowDefinition x:Name="rd1"
                                                   Height="Auto" />
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition x:Name="cd0"
                                                      Width="Auto" />
                                    <ColumnDefinition x:Name="cd1"
                                                      Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <layouttoolkit:AccordionButton x:Name="ExpanderButton"
                                                               BorderBrush="{StaticResource BaseBrush5}"
                                                               BorderThickness="1"
                                                               Background="{TemplateBinding Background}"
                                                               ContentTemplate="{TemplateBinding HeaderTemplate}"
                                                               Content="{TemplateBinding Header}"
                                                               Foreground="{TemplateBinding Foreground}"
                                                               FontWeight="{TemplateBinding FontWeight}"
                                                               FontStyle="{TemplateBinding FontStyle}"
                                                               FontStretch="{TemplateBinding FontStretch}"
                                                               FontSize="{TemplateBinding FontSize}"
                                                               FontFamily="{TemplateBinding FontFamily}"
                                                               HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                                               HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                               IsTabStop="True"
                                                               IsChecked="{TemplateBinding IsSelected}"
                                                               Margin="0,0,0,0"
                                                               Padding="0,0,0,0"
                                                               Grid.Row="0"
                                                               VerticalAlignment="{TemplateBinding VerticalAlignment}"
                                                               VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
                                <layouttoolkit:ExpandableContentControl x:Name="ExpandSite"
                                                                        ContentTemplate="{TemplateBinding ContentTemplate}"
                                                                        Content="{TemplateBinding Content}"
                                                                        Foreground="{TemplateBinding Foreground}"
                                                                        FontWeight="{TemplateBinding FontWeight}"
                                                                        FontStyle="{TemplateBinding FontStyle}"
                                                                        FontStretch="{TemplateBinding FontStretch}"
                                                                        FontSize="{TemplateBinding FontSize}"
                                                                        FontFamily="{TemplateBinding FontFamily}"
                                                                        HorizontalAlignment="{TemplateBinding HorizontalAlignment}"
                                                                        HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                                        IsTabStop="False"
                                                                        Margin="0,0,0,0"
                                                                        Percentage="0"
                                                                        RevealMode="{TemplateBinding ExpandDirection}"
                                                                        Grid.Row="1"
                                                                        VerticalAlignment="{TemplateBinding VerticalAlignment}"
                                                                        VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}" />
                            </Grid>
                        </Border>
                        <Rectangle x:Name="rectangle"
                                   Fill="{StaticResource DisabledBackgroundBrush}"
                                   Stroke="{StaticResource DisabledForegroundBrush}"
                                   IsHitTestVisible="False"
                                   Opacity="0" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="{StaticResource TextContentBrush}" />
    </Style>

    <!--ButtonSpinner Style-->
    <Style TargetType="inputtoolkit:ButtonSpinner">
        <Setter Property="HorizontalContentAlignment"
                Value="Center" />
        <Setter Property="BorderBrush"
                Value="{StaticResource BaseBrush5}" />
        <Setter Property="Background"
                Value="{StaticResource BlankBackgroundBrush}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="inputtoolkit:ButtonSpinner">
                    <Grid>
                        <Grid.Resources>
                            <ControlTemplate x:Key="IncreaseButtonTemplate"
                                             TargetType="RepeatButton">
                                <Grid x:Name="grid"
                                      RenderTransformOrigin="0.5,0.5">
                                    <Grid.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </Grid.RenderTransform>
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition From="Normal"
                                                                  GeneratedDuration="0:0:0.01"
                                                                  To="MouseOver">
                                                    <VisualTransition.GeneratedEasingFunction>
                                                        <ExponentialEase EasingMode="EaseIn"
                                                                         Exponent="7" />
                                                    </VisualTransition.GeneratedEasingFunction>
                                                </VisualTransition>
                                                <VisualTransition From="MouseOver"
                                                                  GeneratedDuration="0:0:0.1"
                                                                  To="Normal">
                                                    <VisualTransition.GeneratedEasingFunction>
                                                        <CircleEase EasingMode="EaseIn" />
                                                    </VisualTransition.GeneratedEasingFunction>
                                                </VisualTransition>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>

                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                                   Storyboard.TargetName="MouseOverBorder">
                                                        <EasingDoubleKeyFrame KeyTime="0"
                                                                              Value="0.8" />
                                                    </DoubleAnimationUsingKeyFrames>

                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                                   Storyboard.TargetName="PressedBorder"
                                                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                                              Value="1.0" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                                                   Storyboard.TargetName="grid">
                                                        <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                                                              Value="1.05" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                                                                   Storyboard.TargetName="grid">
                                                        <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                                                              Value="1.05" />
                                                    </DoubleAnimationUsingKeyFrames>

                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                                                                   Storyboard.TargetName="DisabledVisualElement">
                                                        <SplineDoubleKeyFrame KeyTime="0"
                                                                              Value="0.5" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                                   Storyboard.TargetName="path">
                                                        <EasingDoubleKeyFrame KeyTime="0"
                                                                              Value="0.5" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="FocusStates">
                                            <VisualState x:Name="Focused">
                                                <Storyboard />
                                            </VisualState>
                                            <VisualState x:Name="Unfocused" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Border x:Name="BaseBorder"
                                            BorderBrush="{TemplateBinding BorderBrush}"
                                            BorderThickness="1"
                                            CornerRadius="1">
                                        <Border.Background>
                                            <SolidColorBrush Color="{StaticResource BaseColor7}" />
                                        </Border.Background>
                                        <Grid>
                                            <Border x:Name="Background"
                                                    Background="{TemplateBinding Background}"
                                                    BorderBrush="{StaticResource NormalInnerBorderBrush}" />
                                            <Border x:Name="MouseOverBorder"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    Opacity="0"
                                                    Background="{StaticResource MouseOverBrush}" />

                                            <Border x:Name="PressedBorder"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    Opacity="0"
                                                    Background="{StaticResource MouseOverBrush}" />
                                        </Grid>
                                    </Border>
                                    <Border x:Name="DisabledVisualElement"
                                            BorderBrush="{StaticResource ControlsDisabledBrush}"
                                            BorderThickness="{TemplateBinding BorderThickness}"
                                            Background="{StaticResource ControlsDisabledBrush}"
                                            IsHitTestVisible="False"
                                            Opacity="0" />
                                    <Rectangle x:Name="FocusVisualElement"
                                               IsHitTestVisible="false"
                                               RadiusY="1"
                                               RadiusX="1"
                                               Stroke="{StaticResource FocusedBrush}"
                                               StrokeThickness="1"
                                               Visibility="Collapsed" />
                                    <Path x:Name="path"
                                          Data="F1 M 541.537,173.589L 531.107,173.589L 536.322,167.49L 541.537,173.589 Z "
                                          Fill="{StaticResource BaseBrush3}"
                                          HorizontalAlignment="Stretch"
                                          Margin="4,3,4,3"
                                          Stretch="Uniform"
                                          VerticalAlignment="Stretch"
                                          Width="8"
                                          Height="4" />
                                </Grid>
                            </ControlTemplate>
                            <ControlTemplate x:Key="DecreaseButtonTemplate"
                                             TargetType="RepeatButton">
                                <Grid x:Name="grid"
                                      RenderTransformOrigin="0.5,0.5">
                                    <VisualStateManager.VisualStateGroups>
                                        <VisualStateGroup x:Name="CommonStates">
                                            <VisualStateGroup.Transitions>
                                                <VisualTransition From="Normal"
                                                                  GeneratedDuration="0:0:0.01"
                                                                  To="MouseOver">
                                                    <VisualTransition.GeneratedEasingFunction>
                                                        <ExponentialEase EasingMode="EaseIn"
                                                                         Exponent="7" />
                                                    </VisualTransition.GeneratedEasingFunction>
                                                </VisualTransition>
                                                <VisualTransition From="MouseOver"
                                                                  GeneratedDuration="0:0:0.1"
                                                                  To="Normal">
                                                    <VisualTransition.GeneratedEasingFunction>
                                                        <CircleEase EasingMode="EaseIn" />
                                                    </VisualTransition.GeneratedEasingFunction>
                                                </VisualTransition>
                                            </VisualStateGroup.Transitions>
                                            <VisualState x:Name="Normal" />
                                            <VisualState x:Name="MouseOver">
                                                <Storyboard>

                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                                   Storyboard.TargetName="MouseOverBorder">
                                                        <EasingDoubleKeyFrame KeyTime="0"
                                                                              Value="0.8" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Pressed">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                                   Storyboard.TargetName="PressedBorder"
                                                                                   Storyboard.TargetProperty="(UIElement.Opacity)">
                                                        <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                                              Value="1.0" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleX)"
                                                                                   Storyboard.TargetName="grid">
                                                        <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                                                              Value="1.05" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[0].(ScaleTransform.ScaleY)"
                                                                                   Storyboard.TargetName="grid">
                                                        <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                                                              Value="1.05" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                            <VisualState x:Name="Disabled">
                                                <Storyboard>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                                                                   Storyboard.TargetName="DisabledVisualElement">
                                                        <SplineDoubleKeyFrame KeyTime="0"
                                                                              Value="0.5" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                    <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                                   Storyboard.TargetName="path">
                                                        <EasingDoubleKeyFrame KeyTime="0"
                                                                              Value="0.5" />
                                                    </DoubleAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </VisualState>
                                        </VisualStateGroup>
                                        <VisualStateGroup x:Name="FocusStates">
                                            <VisualState x:Name="Focused">
                                                <Storyboard />
                                            </VisualState>
                                            <VisualState x:Name="Unfocused" />
                                        </VisualStateGroup>
                                    </VisualStateManager.VisualStateGroups>
                                    <Grid.RenderTransform>
                                        <TransformGroup>
                                            <ScaleTransform />
                                            <SkewTransform />
                                            <RotateTransform />
                                            <TranslateTransform />
                                        </TransformGroup>
                                    </Grid.RenderTransform>
                                    <Border x:Name="BaseBorder"
                                            BorderBrush="{TemplateBinding BorderBrush}"
                                            BorderThickness="1"
                                            CornerRadius="1">
                                        <Border.Background>
                                            <SolidColorBrush Color="{StaticResource BaseColor7}" />
                                        </Border.Background>
                                        <Grid>
                                            <Border x:Name="Background"
                                                    Background="{TemplateBinding Background}"
                                                    BorderBrush="{StaticResource NormalInnerBorderBrush}" />
                                            <Border x:Name="MouseOverBorder"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    Opacity="0"
                                                    Background="{StaticResource MouseOverBrush}" />

                                            <Border x:Name="PressedBorder"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    Opacity="0"
                                                    Background="{StaticResource MouseOverBrush}" />
                                        </Grid>
                                    </Border>
                                    <Border x:Name="DisabledVisualElement"
                                            BorderBrush="{StaticResource ControlsDisabledBrush}"
                                            BorderThickness="{TemplateBinding BorderThickness}"
                                            Background="{StaticResource ControlsDisabledBrush}"
                                            IsHitTestVisible="False"
                                            Opacity="0" />
                                    <Rectangle x:Name="FocusVisualElement"
                                               IsHitTestVisible="false"
                                               RadiusY="1"
                                               RadiusX="1"
                                               Stroke="{StaticResource FocusedBrush}"
                                               StrokeThickness="1"
                                               Visibility="Collapsed" />
                                    <Path x:Name="path"
                                          Data="F1 M 531.107,321.943L 541.537,321.943L 536.322,328.042L 531.107,321.943 Z "
                                          Fill="{StaticResource BaseBrush3}"
                                          HorizontalAlignment="Stretch"
                                          Height="4"
                                          Margin="4,3,4,3"
                                          Stretch="Uniform"
                                          VerticalAlignment="Stretch"
                                          Width="8" />
                                </Grid>
                            </ControlTemplate>
                        </Grid.Resources>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="MouseOverBorder">
                                            <EasingDoubleKeyFrame KeyTime="0:0:0.1"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>

                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Foreground"
                                                                       Storyboard.TargetName="presentationSite">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <SolidColorBrush Color="Gray" />
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="DisabledVisual">
                                            <EasingDoubleKeyFrame KeyTime="0"
                                                                  Value="0.5" />
                                        </DoubleAnimationUsingKeyFrames>

                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="FocusVisualElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="IncreaseStates">
                                <VisualState x:Name="IncreaseEnabled" />
                                <VisualState x:Name="IncreaseDisabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DecreaseStates">
                                <VisualState x:Name="DecreaseEnabled" />
                                <VisualState x:Name="DecreaseDisabled" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="ElementContainer"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                Padding="{TemplateBinding Padding}"
                                CornerRadius="1">
                            <Border BorderBrush="Transparent"
                                    BorderThickness="1">
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="*" />
                                        <ColumnDefinition Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="*" />
                                        <RowDefinition Height="*" />
                                    </Grid.RowDefinitions>
                                    <ContentControl x:Name="presentationSite"
                                                    Content="{TemplateBinding Content}"
                                                    HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                    IsTabStop="False"
                                                    Grid.RowSpan="2"
                                                    VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
                                                    BorderBrush="{StaticResource BaseBrush7}" />
                                    <Button Grid.Column="1"
                                            IsHitTestVisible="True"
                                            IsTabStop="False"
                                            Grid.Row="0"
                                            Grid.RowSpan="2">
                                        <Button.Template>
                                            <ControlTemplate TargetType="Button">
                                                <Grid Background="Transparent" />
                                            </ControlTemplate>
                                        </Button.Template>
                                    </Button>
                                    <RepeatButton x:Name="IncreaseButton"
                                                  ClickMode="Press"
                                                  Grid.Column="1"
                                                  IsTabStop="False"
                                                  Grid.Row="0"
                                                  Template="{StaticResource IncreaseButtonTemplate}"
                                                  Background="{StaticResource NormalBrush}"
                                                  BorderBrush="{StaticResource NormalBorderBrush}"
                                                  Foreground="{StaticResource TextContentBrush}" />
                                    <RepeatButton x:Name="DecreaseButton"
                                                  ClickMode="Press"
                                                  Grid.Column="1"
                                                  IsTabStop="False"
                                                  Grid.Row="1"
                                                  Template="{StaticResource DecreaseButtonTemplate}" />
                                </Grid>
                            </Border>
                        </Border>
                        <Border x:Name="DisabledVisual"
                                BorderBrush="{StaticResource BaseBrush6}"
                                Background="{StaticResource BaseBrush7}"
                                Opacity="0"
                                CornerRadius="1"
                                IsHitTestVisible="false" />
                        <Border x:Name="MouseOverBorder"
                                BorderBrush="{StaticResource FocusedBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="1"
                                IsHitTestVisible="false"
                                Opacity="0" />
                        <Border x:Name="FocusVisualElement"
                                BorderBrush="{StaticResource FocusedBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="1"
                                IsHitTestVisible="false"
                                Visibility="Collapsed"
                                Margin="-1" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--TimeUpDown Style-->
    <Style TargetType="inputtoolkit:TimeUpDown">
        <Setter Property="FontFamily"
                Value="{StaticResource ContentFontFamily}" />
        <Setter Property="FontSize"
                Value="{StaticResource ContentFontSize}" />
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="MinWidth"
                Value="125" />
        <Setter Property="MinHeight"
                Value="26" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Background"
                Value="{StaticResource BlankBackgroundBrush}" />
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="MinWidth"
                Value="100" />
        <Setter Property="BorderBrush"
                Value="{StaticResource BaseBrush5}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="inputtoolkit:TimeUpDown">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="TimeHintStates">
                                <VisualState x:Name="TimeHintOpenedUp">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="TimeHintVisualElement">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00"
                                                                    Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                                                       Storyboard.TargetName="TimeHintVisualElement">
                                            <SplineDoubleKeyFrame KeySpline="0,0,0,1"
                                                                  KeyTime="00:00:00.200"
                                                                  Value="-23" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="Height"
                                                                       Storyboard.TargetName="TimeHintVisualElement">
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:00"
                                                                    Value="0" />
                                            <SplineDoubleKeyFrame KeySpline="0,0,0,1"
                                                                  KeyTime="00:00:00.200"
                                                                  Value="22" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="TimeHintOpenedDown">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="TimeHintVisualElement">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00"
                                                                    Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                                                       Storyboard.TargetName="TimeHintVisualElement">
                                            <SplineDoubleKeyFrame KeySpline="0,0,0,1"
                                                                  KeyTime="00:00:00.200"
                                                                  Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="Height"
                                                                       Storyboard.TargetName="TimeHintVisualElement">
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:00"
                                                                    Value="0" />
                                            <SplineDoubleKeyFrame KeySpline="0,0,0,1"
                                                                  KeyTime="00:00:00.200"
                                                                  Value="22" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="TimeHintClosed">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="TimeHintVisualElement">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:20"
                                                                    Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)"
                                                                       Storyboard.TargetName="TimeHintVisualElement">
                                            <SplineDoubleKeyFrame KeySpline="0,0,0,1"
                                                                  KeyTime="00:00:00.200"
                                                                  Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="Height"
                                                                       Storyboard.TargetName="TimeHintVisualElement">
                                            <DiscreteDoubleKeyFrame KeyTime="00:00:00"
                                                                    Value="22" />
                                            <SplineDoubleKeyFrame KeySpline="0,0,0,1"
                                                                  KeyTime="00:00:00.200"
                                                                  Value="0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ParsingStates">
                                <VisualState x:Name="ValidTime">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="validicon">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00"
                                                                    Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidTime">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="invalidicon">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00"
                                                                    Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="EmptyTime">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="emptyicon">
                                            <DiscreteObjectKeyFrame KeyTime="00:00:00"
                                                                    Value="Visible" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidFocused" />
                                <VisualState x:Name="InvalidUnfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Popup x:Name="TimeHintPopup"
                               VerticalOffset="0">
                            <Border x:Name="TimeHintVisualElement"
                                    BorderBrush="Gray"
                                    BorderThickness="1"
                                    Background="{StaticResource BlankBackgroundBrush}"
                                    HorizontalAlignment="Left"
                                    IsHitTestVisible="True"
                                    Visibility="Collapsed">
                                <Border.RenderTransform>
                                    <TransformGroup>
                                        <ScaleTransform />
                                        <SkewTransform />
                                        <RotateTransform />
                                        <TranslateTransform />
                                    </TransformGroup>
                                </Border.RenderTransform>
                                <Grid>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition />
                                        <ColumnDefinition MinWidth="15"
                                                          Width="Auto" />
                                    </Grid.ColumnDefinitions>
                                    <ContentControl Content="{TemplateBinding TimeHintContent}"
                                                    Grid.Column="0"
                                                    Foreground="{StaticResource BaseBrush4}"
                                                    FontSize="11"
                                                    HorizontalAlignment="Right"
                                                    IsHitTestVisible="False"
                                                    IsTabStop="False"
                                                    Margin="3"
                                                    VerticalAlignment="Center" />
                                    <ContentControl x:Name="emptyicon"
                                                    Grid.Column="1"
                                                    IsHitTestVisible="False"
                                                    IsTabStop="False"
                                                    Margin="3"
                                                    Visibility="Collapsed" />
                                    <ContentControl x:Name="validicon"
                                                    Grid.Column="1"
                                                    IsHitTestVisible="False"
                                                    IsTabStop="False"
                                                    Margin="3"
                                                    Visibility="Collapsed" />
                                    <ContentControl x:Name="invalidicon"
                                                    Grid.Column="1"
                                                    IsHitTestVisible="False"
                                                    IsTabStop="False"
                                                    Visibility="Collapsed"
                                                    VerticalAlignment="Center"
                                                    Margin="0,0,4,0">
                                        <Grid Width="15"
                                              Height="15"
                                              d:LayoutOverrides="HorizontalAlignment, VerticalAlignment, Width, Height">
                                            <Path Data="M15.5,111 L133.5,111 L73.5,40 z"
                                                  Fill="{StaticResource ValidationBrush5}"
                                                  Margin="0"
                                                  StrokeStartLineCap="Round"
                                                  Stretch="Fill"
                                                  StrokeEndLineCap="Round"
                                                  Stroke="Black"
                                                  StrokeMiterLimit="210"
                                                  StrokeLineJoin="Round"
                                                  UseLayoutRounding="False"
                                                  StrokeDashCap="Round"
                                                  StrokeThickness="1.5" />
                                            <Path Data="M7.5,5.4166665 L7.5,9.7496738"
                                                  Fill="Black"
                                                  Margin="6.5,5.9,6,4.75"
                                                  StrokeStartLineCap="Round"
                                                  Stretch="Fill"
                                                  StrokeEndLineCap="Round"
                                                  Stroke="Black"
                                                  StrokeMiterLimit="10"
                                                  StrokeLineJoin="Round"
                                                  UseLayoutRounding="False"
                                                  StrokeDashCap="Round"
                                                  StrokeThickness="1.4" />
                                            <Ellipse Fill="{StaticResource BlankBackgroundBrush}"
                                                     Height="1"
                                                     Margin="7,0,7,3"
                                                     StrokeStartLineCap="Round"
                                                     StrokeEndLineCap="Round"
                                                     Stroke="Black"
                                                     StrokeMiterLimit="10"
                                                     StrokeLineJoin="Round"
                                                     VerticalAlignment="Bottom"
                                                     StrokeThickness="1.5" />
                                        </Grid>
                                    </ContentControl>
                                </Grid>
                            </Border>
                        </Popup>
                        <inputtoolkit:ButtonSpinner x:Name="Spinner"
                                                    BorderBrush="{TemplateBinding BorderBrush}"
                                                    BorderThickness="{TemplateBinding BorderThickness}"
                                                    Background="{TemplateBinding Background}"
                                                    HorizontalContentAlignment="Stretch"
                                                    IsTabStop="False"
                                                    MinWidth="35"
                                                    Padding="{TemplateBinding Padding}"
                                                    VerticalContentAlignment="Stretch">
                            <TextBox x:Name="Text"
                                     AcceptsReturn="False"
                                     BorderThickness="0"
                                     Foreground="{TemplateBinding Foreground}"
                                     FontWeight="{TemplateBinding FontWeight}"
                                     FontStyle="{TemplateBinding FontStyle}"
                                     FontStretch="{TemplateBinding FontStretch}"
                                     FontSize="{TemplateBinding FontSize}"
                                     FontFamily="{TemplateBinding FontFamily}"
                                     MinWidth="20"
                                     TextAlignment="Right"
                                     TextWrapping="NoWrap"
                                     Text="{TemplateBinding Value}"
                                     Margin="0,0,5,0">
                                <TextBox.Style>
                                    <Style TargetType="TextBox">
                                        <Setter Property="Template">
                                            <Setter.Value>
                                                <ControlTemplate TargetType="TextBox">
                                                    <ScrollViewer x:Name="ContentElement"
                                                                  BorderThickness="0"
                                                                  Padding="0"
                                                                  Margin="0,2,0,3" />
                                                </ControlTemplate>
                                            </Setter.Value>
                                        </Setter>
                                    </Style>
                                </TextBox.Style>
                            </TextBox>
                        </inputtoolkit:ButtonSpinner>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="{StaticResource TextContentBrush}" />
    </Style>

    <!--RangeTimePickerPopup Style-->
    <Style TargetType="inputtoolkit:RangeTimePickerPopup">
        <Setter Property="FontFamily"
                Value="{StaticResource ContentFontFamily}" />
        <Setter Property="FontSize"
                Value="{StaticResource ContentFontSize}" />
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="PopupMinutesInterval"
                Value="5" />
        <Setter Property="PopupSecondsInterval"
                Value="0" />
        <Setter Property="Height"
                Value="300" />
        <Setter Property="HorizontalAlignment"
                Value="Stretch" />
        <Setter Property="Background"
                Value="White" />
        <Setter Property="SliderStyle">
            <Setter.Value>
                <Style TargetType="Slider">
                    <Setter Property="Orientation"
                            Value="Vertical" />
                    <Setter Property="HorizontalAlignment"
                            Value="Center" />
                </Style>
            </Setter.Value>
        </Setter>
        <Setter Property="TimeButtonStyle">
            <Setter.Value>
                <Style TargetType="Button">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate TargetType="Button">
                                <TextBlock x:Name="label"
                                           Text="{TemplateBinding Content}"
                                           Foreground="{StaticResource TextContentBrush}"
                                           Margin="0"
                                           Padding="0">
                  <VisualStateManager.VisualStateGroups>
                    <VisualStateGroup x:Name="CommonStates">
                      <VisualState x:Name="Normal" />
                      <VisualState x:Name="Disabled">
                        <Storyboard>
						              <ColorAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                    Duration="00:00:00.0010000"
                                                                    Storyboard.TargetName="label"
                                                                    Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)">
							              <SplineColorKeyFrame KeyTime="00:00:00"
                                                               Value="Gray" />
						              </ColorAnimationUsingKeyFrames>
                        </Storyboard>
                      </VisualState>
                    </VisualStateGroup>
                  </VisualStateManager.VisualStateGroups>
                                </TextBlock>
                            </ControlTemplate>
                        </Setter.Value>
                    </Setter>
                </Style>
            </Setter.Value>
        </Setter>

        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="inputtoolkit:RangeTimePickerPopup">
                    <Grid Background="{TemplateBinding Background}">

                        <Grid.Resources>
                            <Style x:Key="CommitButton"
                                   TargetType="Button">
                                <Setter Property="Background"
                                        Value="{StaticResource BlankBackgroundBrush}" />
                                <Setter Property="Foreground"
                                        Value="{StaticResource BaseColor1}" />
                                <Setter Property="Padding"
                                        Value="3" />
                                <Setter Property="BorderThickness"
                                        Value="1" />
                                <Setter Property="BorderBrush">
                                    <Setter.Value>
                                        <LinearGradientBrush EndPoint="0.5,1"
                                                             StartPoint="0.5,0">
                                            <GradientStop Color="{StaticResource BaseColor7}"
                                                          Offset="0" />
                                            <GradientStop Color="{StaticResource BaseColor5}"
                                                          Offset="0.375" />
                                            <GradientStop Color="{StaticResource BaseColor5}"
                                                          Offset="0.375" />
                                            <GradientStop Color="{StaticResource BaseColor4}"
                                                          Offset="1" />
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid FlowDirection="LeftToRight">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal" />
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation"
                                                                                               Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                                                          Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource BaseColor2}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightLightColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="Background"
                                                                                              Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource AccentColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation"
                                                                                               Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                                                          Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightLightColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightestColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                                                               Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                                                          Value=".55" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup x:Name="FocusStates">
                                                        <VisualState x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                                                                               Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                                                          Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Unfocused" />
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Border x:Name="Background"
                                                        Background="{StaticResource BlankBackgroundBrush}"
                                                        BorderBrush="{TemplateBinding BorderBrush}"
                                                        BorderThickness="{TemplateBinding BorderThickness}"
                                                        CornerRadius="3">
                                                    <Grid Margin="1"
                                                          Background="{TemplateBinding Background}">
                                                        <Border x:Name="BackgroundAnimation"
                                                                Opacity="0"
                                                                Background="{StaticResource AccentColorBrush}" />
                                                        <Rectangle x:Name="BackgroundGradient">
                                                            <Rectangle.Fill>
                                                                <LinearGradientBrush EndPoint=".7,1"
                                                                                     StartPoint=".7,0">
                                                                    <GradientStop Color="{StaticResource BaseColor2}"
                                                                                  Offset="0" />
                                                                    <GradientStop Color="{StaticResource BaseColor6}"
                                                                                  Offset="0.375" />
                                                                    <GradientStop Color="{StaticResource BaseColor2}"
                                                                                  Offset="0.625" />
                                                                    <GradientStop Color="{StaticResource TransparentLightColor}"
                                                                                  Offset="1" />
                                                                </LinearGradientBrush>
                                                            </Rectangle.Fill>
                                                        </Rectangle>
                                                        <Grid Margin="5.125,3.5,3.125,3.5">
                                                            <Path Height="6"
                                                                  HorizontalAlignment="Left"
                                                                  Margin="0.376,0,0,0"
                                                                  VerticalAlignment="Top"
                                                                  Width="6.861"
                                                                  Stretch="Fill"
                                                                  StrokeDashCap="Round"
                                                                  StrokeEndLineCap="Round"
                                                                  StrokeStartLineCap="Round"
                                                                  StrokeThickness="1.5"
                                                                  Data="M6.0443821,10.103714 L7.7407737,20.549189 M21.739996,1.5 L7.6783452,20.497122">
                                                                <Path.Stroke>
                                                                    <LinearGradientBrush EndPoint="0.5,1"
                                                                                         StartPoint="0.5,0">
                                                                        <GradientStop Color="{StaticResource OKButtonIconColor1}" />
                                                                        <GradientStop Color="{StaticResource OKButtonIconColor2}"
                                                                                      Offset="1" />
                                                                        <GradientStop Color="{StaticResource OKButtonIconColor3}"
                                                                                      Offset="0.375" />
                                                                    </LinearGradientBrush>
                                                                </Path.Stroke>
                                                                <Path.Fill>
                                                                    <LinearGradientBrush EndPoint="0.5,1"
                                                                                         StartPoint="0.5,0">
                                                                        <GradientStop Color="{StaticResource BaseColor1}" />
                                                                        <GradientStop Color="{StaticResource BaseColor2}"
                                                                                      Offset="1" />
                                                                    </LinearGradientBrush>
                                                                </Path.Fill>
                                                            </Path>
                                                        </Grid>
                                                    </Grid>
                                                </Border>
                                                <Rectangle x:Name="DisabledVisualElement"
                                                           IsHitTestVisible="false"
                                                           Opacity="0"
                                                           Fill="{StaticResource BlankBackgroundBrush}"
                                                           RadiusX="3"
                                                           RadiusY="3" />
                                                <Rectangle Margin="0.936,0.904,1.064,1.096"
                                                           x:Name="FocusVisualElement"
                                                           IsHitTestVisible="false"
                                                           Opacity="0"
                                                           Stroke="{StaticResource FocusedBrush}"
                                                           StrokeThickness="1"
                                                           RadiusX="2"
                                                           RadiusY="2" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                            <Style x:Key="CancelButton"
                                   TargetType="Button">
                                <Setter Property="Background"
                                        Value="{StaticResource BlankBackgroundBrush}" />
                                <Setter Property="Foreground"
                                        Value="{StaticResource BaseColor1}" />
                                <Setter Property="Padding"
                                        Value="3" />
                                <Setter Property="BorderThickness"
                                        Value="1" />
                                <Setter Property="BorderBrush">
                                    <Setter.Value>
                                        <LinearGradientBrush EndPoint="0.5,1"
                                                             StartPoint="0.5,0">
                                            <GradientStop Color="{StaticResource BaseColor7}"
                                                          Offset="0" />
                                            <GradientStop Color="{StaticResource BaseColor5}"
                                                          Offset="0.375" />
                                            <GradientStop Color="{StaticResource BaseColor5}"
                                                          Offset="0.375" />
                                            <GradientStop Color="{StaticResource BaseColor4}"
                                                          Offset="1" />
                                        </LinearGradientBrush>
                                    </Setter.Value>
                                </Setter>
                                <Setter Property="Template">
                                    <Setter.Value>
                                        <ControlTemplate TargetType="Button">
                                            <Grid FlowDirection="LeftToRight">
                                                <VisualStateManager.VisualStateGroups>
                                                    <VisualStateGroup x:Name="CommonStates">
                                                        <VisualState x:Name="Normal" />
                                                        <VisualState x:Name="MouseOver">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation"
                                                                                               Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                                                          Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource BaseColor2}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightLightColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Pressed">
                                                            <Storyboard>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="Background"
                                                                                              Storyboard.TargetProperty="(Border.Background).(SolidColorBrush.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource AccentColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="BackgroundAnimation"
                                                                                               Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                                                          Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[0].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[1].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[2].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightLightColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                                <ColorAnimationUsingKeyFrames Storyboard.TargetName="BackgroundGradient"
                                                                                              Storyboard.TargetProperty="(Rectangle.Fill).(GradientBrush.GradientStops)[3].(GradientStop.Color)">
                                                                    <SplineColorKeyFrame KeyTime="0"
                                                                                         Value="{StaticResource TransparentLightestColor}" />
                                                                </ColorAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Disabled">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement"
                                                                                               Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                                                          Value=".55" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                    </VisualStateGroup>
                                                    <VisualStateGroup x:Name="FocusStates">
                                                        <VisualState x:Name="Focused">
                                                            <Storyboard>
                                                                <DoubleAnimationUsingKeyFrames Storyboard.TargetName="FocusVisualElement"
                                                                                               Storyboard.TargetProperty="Opacity">
                                                                    <SplineDoubleKeyFrame KeyTime="0"
                                                                                          Value="1" />
                                                                </DoubleAnimationUsingKeyFrames>
                                                            </Storyboard>
                                                        </VisualState>
                                                        <VisualState x:Name="Unfocused" />
                                                    </VisualStateGroup>
                                                </VisualStateManager.VisualStateGroups>
                                                <Border x:Name="Background"
                                                        Background="{StaticResource BlankBackgroundBrush}"
                                                        BorderBrush="{TemplateBinding BorderBrush}"
                                                        BorderThickness="{TemplateBinding BorderThickness}"
                                                        CornerRadius="3">
                                                    <Grid Margin="1"
                                                          Background="{TemplateBinding Background}">
                                                        <Border x:Name="BackgroundAnimation"
                                                                Opacity="0"
                                                                Background="{StaticResource AccentColorBrush}" />
                                                        <Rectangle x:Name="BackgroundGradient">
                                                            <Rectangle.Fill>
                                                                <LinearGradientBrush EndPoint=".7,1"
                                                                                     StartPoint=".7,0">
                                                                    <GradientStop Color="{StaticResource BaseColor2}"
                                                                                  Offset="0" />
                                                                    <GradientStop Color="{StaticResource BaseColor6}"
                                                                                  Offset="0.375" />
                                                                    <GradientStop Color="{StaticResource BaseColor2}"
                                                                                  Offset="0.625" />
                                                                    <GradientStop Color="{StaticResource TransparentLightColor}"
                                                                                  Offset="1" />
                                                                </LinearGradientBrush>
                                                            </Rectangle.Fill>
                                                        </Rectangle>
                                                        <Grid Margin="5.125,3.5,3.125,3.5">
                                                            <Path Height="6"
                                                                  HorizontalAlignment="Left"
                                                                  Margin="-1.25,0,0,0"
                                                                  VerticalAlignment="Top"
                                                                  Width="7.75"
                                                                  Fill="{StaticResource TextContentBrush}"
                                                                  Stretch="Fill"
                                                                  StrokeDashCap="Round"
                                                                  StrokeEndLineCap="Round"
                                                                  StrokeStartLineCap="Round"
                                                                  StrokeThickness="1.5"
                                                                  Data="M2.5,1.5000099 L20.5,19.50001 M21.739996,1.5 L1.5,19.883999">
                                                                <Path.Stroke>
                                                                    <LinearGradientBrush EndPoint="0.5,1"
                                                                                         StartPoint="0.5,0">
                                                                        <GradientStop Color="{StaticResource CancelButtonIconColor1}" />
                                                                        <GradientStop Color="{StaticResource CancelButtonIconColor2}"
                                                                                      Offset="0.371" />
                                                                        <GradientStop Color="{StaticResource CancelButtonIconColor3}"
                                                                                      Offset="1" />
                                                                    </LinearGradientBrush>
                                                                </Path.Stroke>
                                                            </Path>
                                                        </Grid>
                                                    </Grid>
                                                </Border>
                                                <Rectangle x:Name="DisabledVisualElement"
                                                           IsHitTestVisible="false"
                                                           Opacity="0"
                                                           Fill="{StaticResource BlankBackgroundBrush}"
                                                           RadiusX="3"
                                                           RadiusY="3" />
                                                <Rectangle Margin="0.936,0.904,1.064,1.096"
                                                           x:Name="FocusVisualElement"
                                                           IsHitTestVisible="false"
                                                           Opacity="0"
                                                           Stroke="{StaticResource FocusedBrush}"
                                                           StrokeThickness="1"
                                                           RadiusX="2"
                                                           RadiusY="2" />
                                            </Grid>
                                        </ControlTemplate>
                                    </Setter.Value>
                                </Setter>
                            </Style>
                        </Grid.Resources>

                        <VisualStateManager.VisualStateGroups>

                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="ContainedByPickerStates">
                                <VisualState x:Name="Contained" />
                                <VisualState x:Name="NotContained">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetName="Commit"
                                                                       Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetName="Cancel"
                                                                       Storyboard.TargetProperty="Visibility">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="PopupModeStates">
                                <VisualState x:Name="AllowSecondsAndDesignatorsSelection" />
                                <VisualState x:Name="AllowTimeDesignatorsSelection" />
                                <VisualState x:Name="AllowSecondsSelection" />
                                <VisualState x:Name="HoursAndMinutesOnly">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondsPanel"
                                                                       Storyboard.TargetProperty="(UIElement.Visibility)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame KeyTime="0"
                                                                    Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="SecondsSlider"
                                                                       Storyboard.TargetProperty="(UIElement.Visibility)"
                                                                       Duration="0">
                                            <DiscreteObjectKeyFrame  KeyTime="0"
                                                                     Value="Collapsed" />
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="*" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Grid HorizontalAlignment="Center"
                              Margin="6">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                                <ColumnDefinition Width="Auto" />
                            </Grid.ColumnDefinitions>
                            <Border Grid.ColumnSpan="8"
                                    Background="{StaticResource BlankBackgroundBrush}"
                                    BorderBrush="{StaticResource NormalBorderBrush}"
                                    BorderThickness="1"
                                    Margin="-3">
                                <Border.Effect>
                                    <DropShadowEffect BlurRadius="10"
                                                      Opacity="0.3"
                                                      Direction="290" />
                                </Border.Effect>
                            </Border>
                            <Slider x:Name="HoursSlider"
                                    Grid.Column="0"
                                    Orientation="Vertical"
                                    HorizontalAlignment="Center"
                                    Margin="5"
                                    Minimum="0"
                                    Maximum="23" />
                            <Grid x:Name="HoursPanel"
                                  Margin="5"
                                  Grid.Column="1" />
                            <Slider x:Name="MinutesSlider"
                                    Grid.Column="2"
                                    Orientation="Vertical"
                                    HorizontalAlignment="Center"
                                    SmallChange="{TemplateBinding PopupMinutesInterval}"
                                    Margin="5"
                                    Minimum="0"
                                    Maximum="59" />
                            <Grid x:Name="MinutesPanel"
                                  Margin="5"
                                  Grid.Column="3" />
                            <Slider x:Name="SecondsSlider"
                                    Grid.Column="4"
                                    Orientation="Vertical"
                                    HorizontalAlignment="Center"
                                    SmallChange="{TemplateBinding PopupSecondsInterval}"
                                    Margin="5"
                                    Minimum="0"
                                    Maximum="59" />
                            <Grid x:Name="SecondsPanel"
                                  Margin="5"
                                  Grid.Column="5" />
                            <StackPanel Grid.Column="6"
                                        VerticalAlignment="Bottom"
                                        HorizontalAlignment="Right"
                                        Margin="12,0,0,0">
                                <Button x:Name="Commit"
                                        Margin="0,15,5,5"
                                        HorizontalAlignment="Right"
                                        TabIndex="2">
                                    <Path Height="6"
                                          HorizontalAlignment="Left"
                                          VerticalAlignment="Top"
                                          Width="6.861"
                                          Stretch="Fill"
                                          StrokeDashCap="Round"
                                          StrokeEndLineCap="Round"
                                          StrokeStartLineCap="Round"
                                          StrokeThickness="1.5"
                                          Data="M6.0443821,10.103714 L7.7407737,20.549189 M21.739996,1.5 L7.6783452,20.497122">
                                        <Path.Stroke>
                                            <LinearGradientBrush EndPoint="0.5,1"
                                                                 StartPoint="0.5,0">
                                                <GradientStop Color="{StaticResource OKButtonIconColor1}" />
                                                <GradientStop Color="{StaticResource OKButtonIconColor2}"
                                                              Offset="1" />
                                                <GradientStop Color="{StaticResource OKButtonIconColor3}"
                                                              Offset="0.375" />
                                            </LinearGradientBrush>
                                        </Path.Stroke>
                                        <Path.Fill>
                                            <LinearGradientBrush EndPoint="0.5,1"
                                                                 StartPoint="0.5,0">
                                                <GradientStop Color="{StaticResource BaseColor1}" />
                                                <GradientStop Color="{StaticResource BaseColor2}"
                                                              Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Fill>
                                    </Path>
                                </Button>
                                <Button x:Name="Cancel"
                                        Margin="0,15,5,5"
                                        HorizontalAlignment="Right"
                                        TabIndex="3">
                                    <Path Height="6"
                                          HorizontalAlignment="Left"
                                          Margin="-1.25,0,0,0"
                                          VerticalAlignment="Top"
                                          Width="7.75"
                                          Fill="{StaticResource TextContentBrush}"
                                          Stretch="Fill"
                                          StrokeDashCap="Round"
                                          StrokeEndLineCap="Round"
                                          StrokeStartLineCap="Round"
                                          StrokeThickness="1.5"
                                          Data="M2.5,1.5000099 L20.5,19.50001 M21.739996,1.5 L1.5,19.883999">
                                        <Path.Stroke>
                                            <LinearGradientBrush EndPoint="0.5,1"
                                                                 StartPoint="0.5,0">
                                                <GradientStop Color="{StaticResource CancelButtonIconColor1}" />
                                                <GradientStop Color="{StaticResource CancelButtonIconColor2}"
                                                              Offset="0.371" />
                                                <GradientStop Color="{StaticResource CancelButtonIconColor3}"
                                                              Offset="1" />
                                            </LinearGradientBrush>
                                        </Path.Stroke>
                                    </Path>
                                </Button>
                            </StackPanel>
                        </Grid>

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--ListTimePickerPopup Style-->
    <Style TargetType="inputtoolkit:ListTimePickerPopup">
        <Setter Property="FontFamily"
                Value="{StaticResource ContentFontFamily}" />
        <Setter Property="FontSize"
                Value="{StaticResource ContentFontSize}" />
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="PopupMinutesInterval"
                Value="30" />
        <Setter Property="PopupSecondsInterval"
                Value="0" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="inputtoolkit:ListTimePickerPopup">
                    <Grid Background="Transparent">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="0" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="ContainedByPickerStates">
                                <VisualState x:Name="Contained">
                                    <Storyboard />
                                </VisualState>
                                <VisualState x:Name="NotContained">
                                    <Storyboard />
                                </VisualState>
                            </VisualStateGroup>

                            <VisualStateGroup x:Name="PopupModeStates">
                                <VisualState x:Name="AllowSecondsAndDesignatorsSelection" />
                                <VisualState x:Name="AllowTimeDesignatorsSelection" />
                                <VisualState x:Name="AllowSecondsSelection" />
                                <VisualState x:Name="HoursAndMinutesOnly" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border Background="{StaticResource BlankBackgroundBrush}">
                            <Border.Effect>
                                <DropShadowEffect BlurRadius="10"
                                                  Opacity="0.2"
                                                  Direction="290" />
                            </Border.Effect>
                        </Border>
                        <ListBox x:Name="ListBox"
                                 IsTabStop="True"
                                 TabIndex="1"
                                 MaxHeight="130"
                                 DisplayMemberPath="Key"
                                 DataContext="{TemplateBinding TimeItemsSelection}"
                                 ItemsSource="{Binding Items}"
                                 SelectedItem="{Binding SelectedItem, Mode=TwoWay}" />

                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    

    <!--RatingItem Style-->
    <Style x:Key="RatingItemStyle"
           TargetType="inputtoolkit:RatingItem">
        <Setter Property="FontFamily"
                Value="{StaticResource ContentFontFamily}" />
        <Setter Property="FontSize"
                Value="{StaticResource ContentFontSize}" />
        <Setter Property="BorderBrush"
                Value="{StaticResource BaseBrush5}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="inputtoolkit:RatingItem">
                    <Grid Background="{TemplateBinding Background}"
                          Width="20">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.2000000" />
                                    <VisualTransition From="MouseOver"
                                                      GeneratedDuration="00:00:00.2000000"
                                                      To="Normal" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Duration="00:00:00.0010000"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="MouseOverRatingItem">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <ColorAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                      Duration="00:00:00.0010000"
                                                                      Storyboard.TargetProperty="(Shape.Fill).(SolidColorBrush.Color)"
                                                                      Storyboard.TargetName="PressedRatingItem">
                                            <EasingColorKeyFrame KeyTime="00:00:00"
                                                                 Value="{StaticResource BaseColor2}" />
                                        </ColorAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Duration="00:00:00.0010000"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="PressedRatingItem">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00"
                                                                  Value="0.39" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Duration="00:00:00.0010000"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="DisabledRatingItem">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Duration="00:00:00.0010000"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="DisabledRatingItemBackground">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Duration="00:00:00.0010000"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="ReadOnlyRatingItem">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.1000000" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Focused">
                                    <Storyboard />
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FillStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition GeneratedDuration="00:00:00.1000000" />
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Empty" />
                                <VisualState x:Name="Partial" />
                                <VisualState x:Name="Filled" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="20" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <Border BorderThickness="0"
                                Background="{StaticResource LightSemiTransparentBrush}" />
                        <Path x:Name="DefaultRatingItem"
                              Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z"
                              Fill="White"
                              Opacity="1"
                              Stretch="Fill"
                              Stroke="{TemplateBinding BorderBrush}"
                              StrokeLineJoin="Round"
                              UseLayoutRounding="False"
                              VerticalAlignment="Stretch" />
                        <System_Windows_Controls_Primitives:LinearClipper ExpandDirection="Right"
                                                                          RatioVisible="{TemplateBinding DisplayValue}">
                            <Path Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z"
                                  Opacity="1"
                                  Stretch="Fill"
                                  Stroke="{x:Null}"
                                  StrokeLineJoin="Round"
                                  UseLayoutRounding="False"
                                  VerticalAlignment="Stretch"
                                  Fill="{StaticResource FocusedBrush}" />
                        </System_Windows_Controls_Primitives:LinearClipper>
                        <Path x:Name="MouseOverRatingItem"
                              Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z"
                              Opacity="0"
                              Stretch="Fill"
                              Stroke="{x:Null}"
                              StrokeLineJoin="Round"
                              UseLayoutRounding="False"
                              VerticalAlignment="Stretch"
                              Fill="{StaticResource MouseOverBrush}" />
                        <Path x:Name="PressedRatingItem"
                              Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z"
                              Fill="{StaticResource DarkSemiTransparentBrush}"
                              Opacity="0"
                              Stretch="Fill"
                              Stroke="{x:Null}"
                              StrokeLineJoin="Round"
                              UseLayoutRounding="False"
                              VerticalAlignment="Stretch" />
                        <Path x:Name="FocusRatingItem"
                              Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z"
                              Opacity="0"
                              Stretch="Fill"
                              Stroke="{StaticResource FocusedBrush}"
                              StrokeThickness="0.01"
                              StrokeLineJoin="Round"
                              UseLayoutRounding="False"
                              VerticalAlignment="Stretch" />
                        <Path x:Name="ReadOnlyRatingItem"
                              Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z"
                              Fill="{StaticResource LightSemiTransparentBrush}"
                              IsHitTestVisible="False"
                              Opacity="0"
                              Stretch="Fill"
                              Stroke="{TemplateBinding BorderBrush}"
                              StrokeThickness="0.4"
                              StrokeLineJoin="Round"
                              UseLayoutRounding="False"
                              VerticalAlignment="Stretch" />
                        <Path x:Name="DisabledRatingItemBackground"
                              Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z"
                              Fill="Gainsboro"
                              Opacity="0"
                              Stretch="Fill"
                              Stroke="{x:Null}"
                              StrokeLineJoin="Round"
                              UseLayoutRounding="False"
                              VerticalAlignment="Stretch" />
                        <System_Windows_Controls_Primitives:LinearClipper x:Name="DisabledRatingItem"
                                                                          ExpandDirection="Right"
                                                                          Opacity="0"
                                                                          RatioVisible="{TemplateBinding DisplayValue}">
                            <Path Data="M15,0 L18.6,11.373603 L30,11.459046 L20.824955,18.573566 L24.270519,30 L15,23.023449 L5.7294912,30 L9.1750822,18.573566 L0,11.459046 L11.399999,11.373603 z"
                                  Fill="{StaticResource BaseBrush4}"
                                  Opacity="1"
                                  Stretch="Fill"
                                  Stroke="{x:Null}"
                                  StrokeLineJoin="Round"
                                  UseLayoutRounding="False"
                                  VerticalAlignment="Stretch" />
                        </System_Windows_Controls_Primitives:LinearClipper>
                        <ContentPresenter x:Name="Content"
                                          Cursor="{TemplateBinding Cursor}"
                                          ContentTemplate="{TemplateBinding ContentTemplate}"
                                          HorizontalAlignment="Left"
                                          Margin="{TemplateBinding Padding}"
                                          Grid.Row="1"
                                          Grid.RowSpan="2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--Rating Style-->
    <Style TargetType="inputtoolkit:Rating">
        <Setter Property="ItemContainerStyle"
                Value="{StaticResource RatingItemStyle}" />
        <Setter Property="FontFamily"
                Value="{StaticResource ContentFontFamily}" />
        <Setter Property="FontSize"
                Value="{StaticResource ContentFontSize}" />
        <Setter Property="Background"
                Value="{StaticResource BlankBackgroundBrush}" />
        <Setter Property="BorderBrush"
                Value="{StaticResource BaseBrush5}" />
        <Setter Property="BorderThickness"
                Value="0" />
        <Setter Property="Foreground">
            <Setter.Value>
                <RadialGradientBrush Center="0.548,0.475"
                                     GradientOrigin="0.484,0.537">
                    <GradientStop Color="{StaticResource TransparentWhiteColor}"
                                  Offset="1" />
                    <GradientStop Color="{StaticResource TransparentWhiteColor}" />
                    <GradientStop Color="{StaticResource TransparentWhiteColor}"
                                  Offset="0.043" />
                </RadialGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="ItemsPanel">
            <Setter.Value>
                <ItemsPanelTemplate>
                    <StackPanel Orientation="Horizontal" />
                </ItemsPanelTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="inputtoolkit:Rating">
                    <Grid x:Name="Root">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="Disabled" />
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Duration="00:00:00.0010000"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="ReadOnlyVisualElement">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00"
                                                                  Value="0.03" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}">
                            <ItemsPresenter />
                        </Border>
                        <Border x:Name="ReadOnlyVisualElement"
                                BorderBrush="{StaticResource ControlsDisabledBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{StaticResource LightSemiTransparentBrush}"
                                IsHitTestVisible="False"
                                Opacity="0" />
                        <Border x:Name="DisabledVisualElement"
                                BorderBrush="{StaticResource ControlsDisabledBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{StaticResource BaseBrush3}"
                                IsHitTestVisible="False"
                                Opacity="0" />
                        <Rectangle x:Name="FocusVisualElement"
                                   IsHitTestVisible="false"
                                   RadiusY="1"
                                   RadiusX="1"
                                   StrokeThickness="1"
                                   Visibility="Collapsed" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--ValidationTooltip-->
    <ControlTemplate x:Key="ValidationToolTipTemplate2">
        <Grid x:Name="Root"
              Margin="5,0"
              Opacity="0"
              RenderTransformOrigin="0,0">
            <Grid.RenderTransform>
                <TranslateTransform x:Name="xform"
                                    X="-25" />
            </Grid.RenderTransform>
            <VisualStateManager.VisualStateGroups>
                <VisualStateGroup x:Name="OpenStates">
                    <VisualStateGroup.Transitions>
                        <VisualTransition GeneratedDuration="0" />
                        <VisualTransition GeneratedDuration="0:0:0.2"
                                          To="Open">
                            <Storyboard>
                                <DoubleAnimation Duration="0:0:0.2"
                                                 To="0"
                                                 Storyboard.TargetProperty="X"
                                                 Storyboard.TargetName="xform">
                                    <DoubleAnimation.EasingFunction>
                                        <BackEase Amplitude=".3"
                                                  EasingMode="EaseOut" />
                                    </DoubleAnimation.EasingFunction>
                                </DoubleAnimation>
                                <DoubleAnimation Duration="0:0:0.2"
                                                 To="1"
                                                 Storyboard.TargetProperty="Opacity"
                                                 Storyboard.TargetName="Root" />
                            </Storyboard>
                        </VisualTransition>
                    </VisualStateGroup.Transitions>
                    <VisualState x:Name="Closed">
                        <Storyboard>
                            <DoubleAnimation Duration="0"
                                             To="0"
                                             Storyboard.TargetProperty="Opacity"
                                             Storyboard.TargetName="Root" />
                        </Storyboard>
                    </VisualState>
                    <VisualState x:Name="Open">
                        <Storyboard>
                            <DoubleAnimation Duration="0"
                                             To="0"
                                             Storyboard.TargetProperty="X"
                                             Storyboard.TargetName="xform" />
                            <DoubleAnimation Duration="0"
                                             To="1"
                                             Storyboard.TargetProperty="Opacity"
                                             Storyboard.TargetName="Root" />
                        </Storyboard>
                    </VisualState>
                </VisualStateGroup>
            </VisualStateManager.VisualStateGroups>
            <Border Background="#052A2E31"
                    CornerRadius="5"
                    Margin="4,4,-4,-4" />
            <Border Background="#152A2E31"
                    CornerRadius="4"
                    Margin="3,3,-3,-3" />
            <Border Background="#252A2E31"
                    CornerRadius="3"
                    Margin="2,2,-2,-2" />
            <Border Background="#352A2E31"
                    CornerRadius="2"
                    Margin="1,1,-1,-1" />
            <Border Background="#FFDC000C"
                    CornerRadius="2" />
            <Border CornerRadius="2">
                <TextBlock Foreground="White"
                           MaxWidth="250"
                           Margin="8,4,8,4"
                           TextWrapping="Wrap"
                           Text="{Binding (Validation.Errors)[0].ErrorContent}"
                           UseLayoutRounding="false" />
            </Border>
        </Grid>
    </ControlTemplate>

    <!-- NumericUpDownTextBox Style -->
    <Style x:Key="NumericUpDownTextBoxStyle"
           TargetType="TextBox">
        <Setter Property="FontFamily"
                Value="{StaticResource ContentFontFamily}" />
        <Setter Property="FontSize"
                Value="{StaticResource ContentFontSize}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="Foreground"
                Value="{StaticResource TextContentBrush}" />
        <Setter Property="Padding"
                Value="2,2,10,2" />
        <Setter Property="MinHeight"
                Value="26" />
        <Setter Property="BorderBrush"
                Value="{StaticResource BaseBrush5}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="TextBox">
                    <Grid x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         To="1"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="DisabledVisualElement" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="ReadOnly">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         To="1"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="ReadOnlyVisualElement" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         To="1"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="FocusVisualElement" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         To="0"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="FocusVisualElement" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen"
                                                                       Storyboard.TargetName="validationTooltip">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="Border"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="{TemplateBinding Background}"
                                CornerRadius="1"
                                Opacity="1">
                            <Grid>
                                <Border x:Name="ReadOnlyVisualElement"
                                        Background="#5EC9C9C9"
                                        Opacity="0" />
                                <Border x:Name="MouseOverBorder"
                                        BorderBrush="{x:Null}"
                                        BorderThickness="1">
                                    <ScrollViewer x:Name="ContentElement"
                                                  BorderThickness="0"
                                                  IsTabStop="False"
                                                  Padding="{TemplateBinding Padding}" />
                                </Border>
                            </Grid>
                        </Border>
                        <Border x:Name="DisabledVisualElement"
                                BorderBrush="#A5F7F7F7"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Background="#A5F7F7F7"
                                IsHitTestVisible="False"
                                Opacity="0" />
                        <Border x:Name="FocusVisualElement"
                                BorderBrush="#FF6DBDD1"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                IsHitTestVisible="False"
                                Margin="1"
                                Opacity="0" />
                        <Border x:Name="ValidationErrorElement"
                                BorderBrush="#FFDB000C"
                                BorderThickness="1"
                                CornerRadius="1"
                                Visibility="Collapsed">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip"
                                         DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                         Placement="Right"
                                         PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                         Template="{StaticResource ValidationToolTipTemplate2}">
                                    <ToolTip.Triggers>
                                        <EventTrigger RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible"
                                                                                   Storyboard.TargetName="validationTooltip">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <System:Boolean>true</System:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid Background="Transparent"
                                  HorizontalAlignment="Right"
                                  Height="12"
                                  Margin="1,-4,-4,0"
                                  VerticalAlignment="Top"
                                  Width="12">
                                <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"
                                      Fill="#FFDC000C"
                                      Margin="1,3,0,0" />
                                <Path Data="M 0,0 L2,0 L 8,6 L8,8"
                                      Fill="#ffffff"
                                      Margin="1,3,0,0" />
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!-- NumericUpDown Style -->
    <Style TargetType="inputtoolkit:NumericUpDown">
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="MinHeight"
                Value="26" />
        <Setter Property="Foreground"
                Value="{StaticResource TextContentBrush}" />
        <Setter Property="FontFamily"
                Value="{StaticResource ContentFontFamily}" />
        <Setter Property="FontSize"
                Value="{StaticResource ContentFontSize}" />
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource BaseColor2}" />
            </Setter.Value>
        </Setter>
        <Setter Property="BorderBrush"
                Value="{StaticResource BaseBrush5}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="inputtoolkit:NumericUpDown">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="DisabledVisualElement">
                                            <EasingDoubleKeyFrame KeyTime="0"
                                                                  Value="0.3" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="MouseOver" />
                                <VisualState x:Name="Pressed" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused" />
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">
                                <VisualStateGroup.Transitions>

                                </VisualStateGroup.Transitions>

                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="Visibility"
                                                                       Storyboard.TargetName="ValidationErrorElement">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsOpen"
                                                                       Storyboard.TargetName="validationTooltip">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                        <Grid>
                            <inputtoolkit:ButtonSpinner HorizontalContentAlignment="Stretch"
                                                        VerticalContentAlignment="Stretch"
                                                        MinWidth="35"
                                                        x:Name="Spinner"
                                                        BorderBrush="{StaticResource BaseBrush5}">
                                <TextBox BorderThickness="0"
                                         FontFamily="{TemplateBinding FontFamily}"
                                         FontSize="{TemplateBinding FontSize}"
                                         FontStretch="{TemplateBinding FontStretch}"
                                         FontStyle="{TemplateBinding FontStyle}"
                                         FontWeight="{TemplateBinding FontWeight}"
                                         Foreground="{TemplateBinding Foreground}"
                                         MinWidth="20"
                                         Height="Auto"
                                         x:Name="Text"
                                         AcceptsReturn="False"
                                         Text="{TemplateBinding Value}"
                                         TextAlignment="Right"
                                         TextWrapping="NoWrap"
                                         Margin="0"
                                         VerticalAlignment="Center"
                                         BorderBrush="{x:Null}"
                                         Style="{StaticResource NumericUpDownTextBoxStyle}" />
                            </inputtoolkit:ButtonSpinner>
                        </Grid>
                        <Border x:Name="DisabledVisualElement"
                                IsHitTestVisible="false"
                                Opacity="0"
                                Background="{StaticResource BlankBackgroundBrush}" />
                        <Border x:Name="ValidationErrorElement"
                                BorderBrush="{StaticResource ValidationBrush5}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Visibility="Collapsed">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip"
                                         DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                         Placement="Right"
                                         PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                         Template="{StaticResource ValidationToolTipTemplate}">
                                    <ToolTip.Triggers>
                                        <EventTrigger RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetProperty="IsHitTestVisible"
                                                                                   Storyboard.TargetName="validationTooltip">
                                                        <DiscreteObjectKeyFrame KeyTime="0"
                                                                                Value="true" />
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid Background="Transparent"
                                  HorizontalAlignment="Right"
                                  Height="10"
                                  Margin="0,-4,-4,0"
                                  VerticalAlignment="Top"
                                  Width="10">
                                <Path Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z"
                                      Fill="{StaticResource ValidationBrush5}"
                                      Margin="-1,3,0,0" />
                                <Path Data="M 0,0 L2,0 L 8,6 L8,8"
                                      Fill="{StaticResource BlankBackgroundBrush}"
                                      Margin="-1,3,0,0" />
                            </Grid>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <!--DomainUpDown Style-->
    <Style TargetType="inputtoolkit:DomainUpDown">
        <Setter Property="FontFamily"
                Value="{StaticResource ContentFontFamily}" />
        <Setter Property="FontSize"
                Value="{StaticResource ContentFontSize}" />
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="MinWidth"
                Value="125" />
        <Setter Property="MinHeight"
                Value="26" />
        <Setter Property="HorizontalContentAlignment"
                Value="Left" />
        <Setter Property="VerticalContentAlignment"
                Value="Center" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="Background">
            <Setter.Value>
                <SolidColorBrush Color="{StaticResource BaseColor2}" />
            </Setter.Value>
        </Setter>
        <Setter Property="Padding"
                Value="0" />
        <Setter Property="IsTabStop"
                Value="False" />
        <Setter Property="BorderBrush"
                Value="{StaticResource BaseBrush5}" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="inputtoolkit:DomainUpDown">
                    <Grid x:Name="RootElement">
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Pressed" />
                                <VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetName="MouseOverBorder"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                                  Value="1.0" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Duration="00:00:00.0010000"
                                                                       Storyboard.TargetName="DisabledBorder"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00"
                                                                  Value="0.7" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity"
                                                                       Storyboard.TargetName="FocusVisualElement">
                                            <SplineDoubleKeyFrame KeyTime="0"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Unfocused" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="InteractionModeStates">
                                <VisualState x:Name="Edit">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         Storyboard.TargetName="Text"
                                                         Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         To="1" />
                                        <DoubleAnimation Duration="0"
                                                         Storyboard.TargetName="Visualization"
                                                         Storyboard.TargetProperty="(UIElement.Opacity)"
                                                         To="0" />
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="Display" />
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="DomainStates">
                                <VisualState x:Name="ValidDomain" />
                                <VisualState x:Name="InvalidDomain">
                                    <Storyboard>
                                        <ObjectAnimationUsingKeyFrames Duration="0"
                                                                       Storyboard.TargetName="ErrorVisualElement"
                                                                       Storyboard.TargetProperty="(UIElement.Visibility)">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <Visibility>Visible</Visibility>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="ValidationStates">

                                <VisualState x:Name="Valid" />
                                <VisualState x:Name="InvalidUnfocused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetName="ValidationErrorElement"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                                <VisualState x:Name="InvalidFocused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"
                                                                       Storyboard.TargetName="ValidationErrorElement"
                                                                       Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <EasingDoubleKeyFrame KeyTime="00:00:00.1000000"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip"
                                                                       Storyboard.TargetProperty="IsOpen">
                                            <DiscreteObjectKeyFrame KeyTime="0">
                                                <DiscreteObjectKeyFrame.Value>
                                                    <System:Boolean>True</System:Boolean>
                                                </DiscreteObjectKeyFrame.Value>
                                            </DiscreteObjectKeyFrame>
                                        </ObjectAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>

                        </VisualStateManager.VisualStateGroups>
                        <Grid MinHeight="20">

                            <Border x:Name="Border"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    Background="{TemplateBinding Background}"
                                    Opacity="1"
                                    Grid.ColumnSpan="2" />
                            <Border x:Name="MouseOverBorder"
                                    BorderThickness="1,1,1,1"
                                    BorderBrush="{StaticResource MouseOverBrush}"
                                    Opacity="0"
                                    Grid.ColumnSpan="2" />
                            <Border x:Name="FocusVisualElement"
                                    BorderBrush="{StaticResource FocusedBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"
                                    IsHitTestVisible="False"
                                    Opacity="0"
                                    Grid.ColumnSpan="2"
                                    Margin="-1" />
                            <inputtoolkit:ButtonSpinner HorizontalContentAlignment="Stretch"
                                                        VerticalContentAlignment="Stretch"
                                                        MinWidth="35"
                                                        x:Name="Spinner"
                                                        BorderBrush="{StaticResource BaseBrush5}">
                                <Grid>
                                    <ContentControl x:Name="Visualization"
                                                    HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                                    Margin="0"
                                                    VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                                    IsHitTestVisible="False"
                                                    Opacity="1"
                                                    FontFamily="{TemplateBinding FontFamily}"
                                                    FontSize="{TemplateBinding FontSize}"
                                                    FontStretch="{TemplateBinding FontStretch}"
                                                    Foreground="{TemplateBinding Foreground}"
                                                    IsTabStop="False"
                                                    Padding="0"
                                                    Content="{TemplateBinding Value}"
                                                    ContentTemplate="{TemplateBinding ItemTemplate}" />
                                    <TextBox x:Name="Text"
                                             Margin="0"
                                             HorizontalContentAlignment="Left"
                                             VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                             IsHitTestVisible="False"
                                             BorderThickness="0"
                                             FontFamily="{TemplateBinding FontFamily}"
                                             FontSize="{TemplateBinding FontSize}"
                                             FontStretch="{TemplateBinding FontStretch}"
                                             Foreground="{TemplateBinding Foreground}"
                                             IsTabStop="True"
                                             Padding="0"
                                             AcceptsReturn="False"
                                             TextWrapping="NoWrap"
                                             BorderBrush="{StaticResource BaseBrush5}">
                                        <TextBox.Background>
                                            <SolidColorBrush Color="{StaticResource BaseColor2}" />
                                        </TextBox.Background>
                                        <TextBox.Style>
                                            <Style TargetType="TextBox">
                                                <Setter Property="Template">
                                                    <Setter.Value>
                                                        <ControlTemplate TargetType="TextBox">
                                                            <ScrollViewer x:Name="ContentElement"
                                                                          BorderThickness="0"
                                                                          Padding="0" />
                                                        </ControlTemplate>
                                                    </Setter.Value>
                                                </Setter>
                                            </Style>
                                        </TextBox.Style>
                                    </TextBox>
                                </Grid>
                            </inputtoolkit:ButtonSpinner>
                        </Grid>
                        <Border x:Name="ValidationErrorElement"
                                BorderBrush="{StaticResource ControlsValidationBrush}"
                                BorderThickness="1"
                                IsHitTestVisible="false"
                                Opacity="0"
                                Grid.ColumnSpan="2">
                            <ToolTipService.ToolTip>
                                <ToolTip x:Name="validationTooltip"
                                         DataContext="{Binding RelativeSource={RelativeSource TemplatedParent}}"
                                         Template="{StaticResource ValidationToolTipTemplate}"
                                         Placement="Right"
                                         PlacementTarget="{Binding RelativeSource={RelativeSource TemplatedParent}}">
                                    <ToolTip.Triggers>
                                        <EventTrigger RoutedEvent="Canvas.Loaded">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ObjectAnimationUsingKeyFrames Storyboard.TargetName="validationTooltip"
                                                                                   Storyboard.TargetProperty="IsHitTestVisible">
                                                        <DiscreteObjectKeyFrame KeyTime="0">
                                                            <DiscreteObjectKeyFrame.Value>
                                                                <System:Boolean>true</System:Boolean>
                                                            </DiscreteObjectKeyFrame.Value>
                                                        </DiscreteObjectKeyFrame>
                                                    </ObjectAnimationUsingKeyFrames>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ToolTip.Triggers>
                                </ToolTip>
                            </ToolTipService.ToolTip>
                            <Grid Height="12"
                                  HorizontalAlignment="Right"
                                  Margin="1,-4,-4,0"
                                  VerticalAlignment="Top"
                                  Width="12"
                                  Background="Transparent">
                                <Path Fill="{StaticResource ValidationBrush5}"
                                      Margin="1,3,0,0"
                                      Data="M 1,0 L6,0 A 2,2 90 0 1 8,2 L8,7 z" />
                                <Path Fill="{StaticResource BlankBackgroundBrush}"
                                      Margin="1,3,0,0"
                                      Data="M 0,0 L2,0 L 8,6 L8,8" />
                            </Grid>
                        </Border>

                        <Border x:Name="ErrorVisualElement"
                                IsHitTestVisible="False"
                                BorderBrush="Red"
                                BorderThickness="2"
                                Margin="-2"
                                Visibility="Collapsed"
                                Grid.ColumnSpan="2" />
                        <Border x:Name="DisabledBorder"
                                IsHitTestVisible="False"
                                BorderBrush="{StaticResource DisabledBackgroundBrush}"
                                BorderThickness="1"
                                Background="{StaticResource DisabledBackgroundBrush}"
                                Opacity="0"
                                Grid.ColumnSpan="2" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
        <Setter Property="Foreground"
                Value="{StaticResource TextContentBrush}" />
    </Style>

    <!--ContextMenu Style-->
    <Style TargetType="inputtoolkit:ContextMenu">
        <Setter Property="FontFamily"
                Value="{StaticResource ContentFontFamily}" />
        <Setter Property="Foreground"
                Value="{StaticResource TextContentBrush}" />
        <Setter Property="FontSize"
                Value="{StaticResource ContentFontSize}" />
        <Setter Property="Background"
                Value="{StaticResource BlankBackgroundBrush}" />
        <Setter Property="BorderThickness"
                Value="1" />
        <Setter Property="BorderBrush"
                Value="{StaticResource BaseBrush5}" />
        <Setter Property="Padding"
                Value="2" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="inputtoolkit:ContextMenu">
                    <Border BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}"
                            Background="{TemplateBinding Background}">
                        <Border.Effect>
                            <DropShadowEffect Color="LightGray"
                                              ShadowDepth="3" />
                        </Border.Effect>
                        <Grid>
                            <Rectangle Fill="{StaticResource BaseBrush7}"
                                       HorizontalAlignment="Left"
                                       Margin="2"
                                       RadiusY="2"
                                       RadiusX="2"
                                       Width="28" />
                            <Rectangle Fill="{StaticResource BaseBrush6}"
                                       HorizontalAlignment="Left"
                                       Margin="30,2,0,2"
                                       Width="1" />
                            <ItemsPresenter Margin="{TemplateBinding Padding}" />
                        </Grid>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>

    </Style>

    <!--MenuItem Style-->
    <Style TargetType="inputtoolkit:MenuItem">
        <Setter Property="FontFamily"
                Value="{StaticResource ContentFontFamily}" />
        <Setter Property="Foreground"
                Value="{StaticResource TextContentBrush}" />
        <Setter Property="FontSize"
                Value="{StaticResource ContentFontSize}" />
        <Setter Property="Background"
                Value="Transparent" />
        <Setter Property="BorderBrush"
                Value="Transparent" />
        <Setter Property="Padding"
                Value="4,3,2,3" />
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="inputtoolkit:MenuItem">
                    <Grid>
                        <VisualStateManager.VisualStateGroups>
                            <VisualStateGroup x:Name="CommonStates">
                                <VisualStateGroup.Transitions>
                                    <VisualTransition From="Normal"
                                                      GeneratedDuration="0:0:0.01"
                                                      To="Focused">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <ExponentialEase EasingMode="EaseIn"
                                                             Exponent="7" />
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                    <VisualTransition From="Focused"
                                                      GeneratedDuration="0:0:0.1"
                                                      To="Normal">
                                        <VisualTransition.GeneratedEasingFunction>
                                            <CircleEase EasingMode="EaseIn" />
                                        </VisualTransition.GeneratedEasingFunction>
                                    </VisualTransition>
                                </VisualStateGroup.Transitions>
                                <VisualState x:Name="Normal" />
                                <VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimation Duration="0"
                                                         To="0.5"
                                                         Storyboard.TargetProperty="Opacity"
                                                         Storyboard.TargetName="Presenter" />
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                            <VisualStateGroup x:Name="FocusStates">
                                <VisualState x:Name="Unfocused" />
                                <VisualState x:Name="Focused">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)"
                                                                       Storyboard.TargetName="MouseOverBorder">
                                            <EasingDoubleKeyFrame KeyTime="0"
                                                                  Value="1" />
                                        </DoubleAnimationUsingKeyFrames>
                                        <ColorAnimationUsingKeyFrames Storyboard.TargetName="ContentPresenterWrapperColor"
                                                                      Storyboard.TargetProperty="Color">
                                            <EasingColorKeyFrame KeyTime="0"
                                                                 Value="{StaticResource BaseColor2}" />
                                        </ColorAnimationUsingKeyFrames>
                                    </Storyboard>
                                </VisualState>
                            </VisualStateGroup>
                        </VisualStateManager.VisualStateGroups>
                        <Border x:Name="MouseOverBorder"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="1"
                                Opacity="0"
                                Margin="1"
                                Background="{StaticResource MouseOverBrush}" />
                        <Rectangle Fill="{TemplateBinding Background}"
                                   RadiusY="2"
                                   RadiusX="2"
                                   Stroke="{TemplateBinding BorderBrush}"
                                   StrokeThickness="1" />
                        <Rectangle x:Name="Bg"
                                   Opacity="0"
                                   RadiusY="2"
                                   RadiusX="2"
                                   Stroke="{StaticResource DarkSemiTransparentBrush}"
                                   StrokeThickness="1">
                            <Rectangle.Fill>
                                <LinearGradientBrush EndPoint="0,1"
                                                     StartPoint="0,0">
                                    <GradientStop Color="{StaticResource TransparentLightestColor}"
                                                  Offset="0" />
                                    <GradientStop Color="{StaticResource SemiSemiTransparentAccentColor}"
                                                  Offset="1" />
                                </LinearGradientBrush>
                            </Rectangle.Fill>
                        </Rectangle>
                        <Rectangle x:Name="InnerBorder"
                                   Margin="1"
                                   RadiusY="2"
                                   RadiusX="2"
                                   Stroke="Transparent" />
                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition MinWidth="24"
                                                  Width="Auto" />
                                <ColumnDefinition Width="4" />
                                <ColumnDefinition Width="*" />
                                <ColumnDefinition Width="17" />
                            </Grid.ColumnDefinitions>
                            <ContentPresenter Content="{TemplateBinding Icon}"
                                              Margin="1"
                                              VerticalAlignment="Center" />
                            <ContentControl Grid.Column="2"
                                            Margin="{TemplateBinding Padding}">
                                <ContentControl.Foreground>
                                    <SolidColorBrush x:Name="ContentPresenterWrapperColor"
                                                     Color="{StaticResource BaseColor1}" />
                                </ContentControl.Foreground>
                                <ContentPresenter x:Name="Presenter"
                                                  ContentTemplate="{TemplateBinding HeaderTemplate}"
                                                  Content="{TemplateBinding Header}"
                                                  Grid.Column="2"
                                                  Margin="{TemplateBinding Padding}" />
                            </ContentControl>
                        </Grid>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>


</ResourceDictionary>